<?php

use App\Helpers\Helper;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| OpenAPI Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::get('/laravel', function () {
    return view('welcome');
});

Route::middleware(['auth:openapi'])->group(function () {
    Route::get('/loop', function (Request $request) {
        return 'loop';
    })->name('openapi.loop')->description('公共接口:回环测试'); 
    Route::post('predict/result', 'OpenAPIsController@predict_result')->name('openAPIs.predict_result')->description('开发接口:预测结果');
    Route::post('predict/history', 'OpenAPIsController@predict_history')->name('openAPIs.predict_history')->description('开发接口:预测历史');

});
